home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
002
/
stripcr.arc
/
STRIPCR.DOC
< prev
Wrap
Text File
|
1987-12-23
|
4KB
|
96 lines
STRIPCR Version 1.0 12-20-87
PURPOSE: Strips all carriage returns/linefeeds(cr/lf) out of text
except those at the end of a paragraph. The resulting
paragraph will be contained on 1 line regardless of how
many lines it originally had.
APPLICATION: Certain word processors such as MicroSoft WORD only use a
cr/lf at the end of a paragraph. Since most word
processors and editors insert a cr/lf at the end of each
line of text, some means is needed to convert a normal
ASCII file to the WORD format. STRIPCR is a conversion
program that does this.
SYNTAX:
STRIPCR SOURCE_FILE /U /L /F /E /H /+N
New file will be created with extension ".NEW"
Switches shown are optional & mean:
/U convert letters to Upper case
/L convert letters to Lower case
/F delete any Form feeds
/E delete Extended characters > Ascii 127
/H strip WordStar High bits
/+N max allowed blank lines between paragraphs where N = 1 TO 9
Enclose a block of text with tildes '~' to preserve carriage return/linefeeds.
COMMENTS:
1. Typing STRIPCR by itself will display a help screen.
2. At least one blank line is needed at the end of each paragraph so
STRIPCR can determine that a paragraph has ended.
3. All cr/lf's can be preserved for certain parts of a text file. For
example, this could be used to preserve the layout of a table
of numbers. Inserting a tilde character '~' in the source
file to be converted, will alternately toggle on and off the
carriage return stripping process. Hence, to preserve a table
of numbers, enclose that table with tildes prior to running
STRIPCR. The tildes will not be printed in the converted file.
See example below:
This text will have all its carriage returns and
linefeeds removed, except for those at the end of
each paragraph. Since we want to preserve the
layout of the following table, enclose it with
tildes.
~
Age Weight
10 100
20 200
~
Next paragraph to convert starts here.
4. All characters less than ASCII 31 will be deleted from the
converted file. Exceptions are the required carriage returns,
linefeeds and formfeeds.
5. Whenever the program can detect an end of a sentence, it will
place two blanks after a period. The end of a sentence is
detected by finding a period followed by a blank or a carriage
return. If the period is embedded in text as in a number (ie,
3.1), no extra blanks will be added.
6. Extraneous trailing blanks at the end of a line in the original
file will be removed.
7. Tabs will automatically be expanded into spaces. It assumes 8
spaces per tab.
OTHER:
Author: John Gasal
Written in: Assembly Language
Max file size: No limit
Cost: None for either the Program or source code
If you have comments on this program or would like to have the
source code, please contact me via PC Library BBS (612-435-2554)
or write me (include self addressed stamped envelope) at:
John Gasal
1110 Blackoaks Ct
Anoka, Mn 55303
[end]